package com.xxx.mall.service;

import com.xxx.mall.dto.AttachFileDTO;
import com.xxx.mall.dto.PageQuery;
import com.xxx.mall.model.AttachFile;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xxx.mall.vo.AttachFileVO;
import com.xxx.mall.vo.PageVO;

import java.util.List;

/**
 * <p>
 * 上传文件记录表 服务类
 * </p>
 *
 * @author 邢晨旭
 * @since 2023-11-20
 */
public interface AttachFileService extends IService<AttachFile> {

    /**
     * 分页查询
     * @param pageQuery
     * @param fileName
     * @param fileGroupId
     * @return
     */
    PageVO<AttachFileVO> pageList(PageQuery pageQuery, String fileName, Long fileGroupId);

    /**
     * 批量保存
     * @param list
     */
    void saveInfo(List<AttachFileDTO> list);

    /**
     * 根据id修改文件名或者文件组id
     * @param dto id,fileName,fileGroupId
     */
    void updateNameOrGroupById(AttachFileDTO dto);

    /**
     * 根据id删除
     * @param id
     */
    void deleteById(Long id);

    void deleteBatchByIds(List<Long> ids);
}
